<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>圣杯布局 - Flexbox</title>
    <style>
      * {
        padding: 0;
        margin: 0;
      }
      html,
      body {
        height: 100%;
      }
      .container {
        display: flex;
        height: 100%;
      }
      .main {
        flex: 1;
        padding: 20px;
        border: 1px solid red;
        border-radius: 10px;
        margin: 0 10px;
        color: red;
        font-weight: bold;
      }
      .left,
      .right {
        width: 200px;
        background-color: red;
        padding: 20px;
        border-radius: 10px;
        color: #ffffff;
        font-weight: bold;
      }
      .left {
        order: -1;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="left">左侧栏 定宽</div>
      <div class="main">主内容区 自适应</div>
      <div class="right">右侧栏 定宽</div>
    </div>
  </body>
</html>
